package com.nut.lmsc.api.client;

import com.nut.lmsc.common.Result;
import com.nut.lmsc.entity.GoodsSpec;
import com.nut.lmsc.service.GoodsSpecService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@Slf4j
@RestController
@RequestMapping("/client/goodsSpec")
public class GoodsSpecController {

    @Autowired
    private GoodsSpecService goodsSpecService;

    @GetMapping(value = "/goodsId/{goodsId}")
    public Result<List<GoodsSpec>> selectByGoodsId(@PathVariable Integer goodsId) {
        return goodsSpecService.selectByGoodsId(goodsId);
    }

}